package kr.hkit.powerjava.chapter12.poly;

public class ShapeTest {
	private static Shape arrayOfShapes[];
	public static void main(String[] args) {
		long a = System.currentTimeMillis();
		init();
		
		drawAll();
		long b = System.currentTimeMillis();
		System.out.println(b-a);
	}
	
	public static void init(){
		arrayOfShapes = new Shape[3];
		arrayOfShapes[0] = new Rectangle2();
		arrayOfShapes[1] = new Triangle1();
		arrayOfShapes[2] = new Circle();
	}
	
	public static void drawAll(){
		for(int i = 0; i<arrayOfShapes.length; i++){
			arrayOfShapes[i]. draw();
		} 
	}
		
	
	
}
